impl Solution {
    pub fn check_valid_string(s: String) -> bool {
        let s = s.as_bytes();
        let mut left_stack=[0usize;100];
        let mut mul_stack=[0usize;100];
        let mut left_count = 0;
        let mut mul_count = 0;
        for i in 0..s.len() {
            match s[i] {
                b'(' => {
                    left_stack[left_count]=i;
                    left_count += 1;
                }
                b')' => {
                    if left_count > 0 {
                        left_count -= 1;
                    } else if mul_count > 0 {
                        mul_count -= 1;
                    } else {
                        return false;
                    }
                }
                _ => {
                    mul_stack[mul_count]=i;
                    mul_count += 1;
                }
            }
        }
       if mul_count>=left_count{
            while mul_count>0&&left_count>0{
                if left_stack[left_count-1]>mul_stack[mul_count-1]{
                    return  false;
                }
                left_count-=1;
                mul_count-=1;
            }
            if left_count>0{
                return  false;
            }
            return true;
        }else{
            return  false;
        }
    }
}
